package com.back.utils;
/**
 * 生成jwt
 * 使用Hs256算法, 私匙使用固定秘钥
 *
 * @param secretKey jwt秘钥
 * @param ttlMillis jwt过期时间(毫秒)
 * @param claims    设置的信息
 * @return
 */
public class BaseContext {

    public static ThreadLocal<Long> threadLocal = new ThreadLocal<>();

    public static void setCurrentId(Long id) {
        threadLocal.set(id);
    }

    public static Long getCurrentId() {
        return threadLocal.get();
    }

    public static void removeCurrentId() {
        threadLocal.remove();
    }

}